<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>数据类型转换 | MXY 1.0版Python整理</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../../home/3.变量和数据类型/4.运算和运算符.html" />
    
    
    <link rel="prev" href="../../home/3.变量和数据类型/2.数据类型.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="3.3"
        data-chapter-title="数据类型转换"
        data-filepath="home/3.变量和数据类型/3.数据类型转换.md"
        data-basepath="../.."
        data-revision="Mon Oct 22 2018 08:32:35 GMT+0800 (中国标准时间)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        MXY整理版Python基础
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" >
            
            <span><b>1.</b> Python的安装和简介</span>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="home/1.Python的安装和简介/1.python基础知识.html">
            
                
                    <a href="../../home/1.Python的安装和简介/1.python基础知识.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        Python的基础知识
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="home/1.Python的安装和简介/2.python的安装及版本检测.html">
            
                
                    <a href="../../home/1.Python的安装和简介/2.python的安装及版本检测.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        Python安装及版本检测
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="home/1.Python的安装和简介/3.第一个python程序.html">
            
                
                    <a href="../../home/1.Python的安装和简介/3.第一个python程序.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.</b>
                        
                        第一个Python程序
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" >
            
            <span><b>2.</b> Python的基本语法</span>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="home/2.Python的基本语法/1.注释及语句分类.html">
            
                
                    <a href="../../home/2.Python的基本语法/1.注释及语句分类.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        注释及语句分类
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="home/2.Python的基本语法/2.命名方式和关键字.html">
            
                
                    <a href="../../home/2.Python的基本语法/2.命名方式和关键字.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        命名方式和关键字
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3" >
            
            <span><b>3.</b> Python的变量及数据类型</span>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1" data-path="home/3.变量和数据类型/1.变量.html">
            
                
                    <a href="../../home/3.变量和数据类型/1.变量.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.</b>
                        
                        变量
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="home/3.变量和数据类型/2.数据类型.html">
            
                
                    <a href="../../home/3.变量和数据类型/2.数据类型.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.</b>
                        
                        数据类型
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="3.3" data-path="home/3.变量和数据类型/3.数据类型转换.html">
            
                
                    <a href="../../home/3.变量和数据类型/3.数据类型转换.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.</b>
                        
                        数据类型转换
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.4" data-path="home/3.变量和数据类型/4.运算和运算符.html">
            
                
                    <a href="../../home/3.变量和数据类型/4.运算和运算符.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.4.</b>
                        
                        数据类型转换
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4" >
            
            <span><b>4.</b> Python的流程控制</span>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.1" data-path="home/4.流程控制/1.顺序结构和分支结构.html">
            
                
                    <a href="../../home/4.流程控制/1.顺序结构和分支结构.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.1.</b>
                        
                        顺序结构和分支结构
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="home/4.流程控制/2.循环结构.html">
            
                
                    <a href="../../home/4.流程控制/2.循环结构.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.2.</b>
                        
                        循环结构
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5" >
            
            <span><b>5.</b> 函数及作用域</span>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.1" data-path="home/5.函数及作用域/1.函数.html">
            
                
                    <a href="../../home/5.函数及作用域/1.函数.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.1.</b>
                        
                        函数
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.2" data-path="home/5.函数及作用域/2.函数文档.html">
            
                
                    <a href="../../home/5.函数及作用域/2.函数文档.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.2.</b>
                        
                        函数文档
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.3" data-path="home/5.函数及作用域/3.变量的作用域.html">
            
                
                    <a href="../../home/5.函数及作用域/3.变量的作用域.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.3.</b>
                        
                        变量的作用域
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.4" data-path="home/5.函数及作用域/4.内部函数和闭包操作.html">
            
                
                    <a href="../../home/5.函数及作用域/4.内部函数和闭包操作.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.4.</b>
                        
                        内部函数和闭包操作
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.5" data-path="home/5.函数及作用域/5.lambda表达式.html">
            
                
                    <a href="../../home/5.函数及作用域/5.lambda表达式.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.5.</b>
                        
                        lambda表达式
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.6" data-path="home/5.函数及作用域/6.高阶函数.html">
            
                
                    <a href="../../home/5.函数及作用域/6.高阶函数.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.6.</b>
                        
                        高阶函数
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="6" >
            
            <span><b>6.</b> 内置函数及操作</span>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="6.1" data-path="home/6.内置函数及操作/1.字符串相关.html">
            
                
                    <a href="../../home/6.内置函数及操作/1.字符串相关.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.1.</b>
                        
                        字符串相关
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.2" data-path="home/6.内置函数及操作/2.format格式字符串.html">
            
                
                    <a href="../../home/6.内置函数及操作/2.format格式字符串.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.2.</b>
                        
                        format格式字符串
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.3" data-path="home/6.内置函数及操作/3.内建函数.html">
            
                
                    <a href="../../home/6.内置函数及操作/3.内建函数.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.3.</b>
                        
                        内建函数
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.4" data-path="home/6.内置函数及操作/4.列表.html">
            
                
                    <a href="../../home/6.内置函数及操作/4.列表.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.4.</b>
                        
                        列表
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.5" data-path="home/6.内置函数及操作/5.元组.html">
            
                
                    <a href="../../home/6.内置函数及操作/5.元组.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.5.</b>
                        
                        元组
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.6" data-path="home/6.内置函数及操作/6.字典.html">
            
                
                    <a href="../../home/6.内置函数及操作/6.字典.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.6.</b>
                        
                        字典
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.7" data-path="home/6.内置函数及操作/7.集合.html">
            
                
                    <a href="../../home/6.内置函数及操作/7.集合.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.7.</b>
                        
                        集合
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.8" data-path="home/6.内置函数及操作/8.文件操作.html">
            
                
                    <a href="../../home/6.内置函数及操作/8.文件操作.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.8.</b>
                        
                        文件操作
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="7" >
            
            <span><b>7.</b> 常用的模块</span>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="7.1" data-path="home/7.常用模块/1.String模块.html">
            
                
                    <a href="../../home/7.常用模块/1.String模块.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.1.</b>
                        
                        String模块
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.2" data-path="home/7.常用模块/2.math模块.html">
            
                
                    <a href="../../home/7.常用模块/2.math模块.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.2.</b>
                        
                        math模块
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.3" data-path="home/7.常用模块/3.OS模块.html">
            
                
                    <a href="../../home/7.常用模块/3.OS模块.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.3.</b>
                        
                        OS模块
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.4" data-path="home/7.常用模块/4.zipfile模块.html">
            
                
                    <a href="../../home/7.常用模块/4.zipfile模块.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.4.</b>
                        
                        zipfile模块
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.5" data-path="home/7.常用模块/5.tarfile模块.html">
            
                
                    <a href="../../home/7.常用模块/5.tarfile模块.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.5.</b>
                        
                        tarfile模块
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.6" data-path="home/7.常用模块/6.shutil模块.html">
            
                
                    <a href="../../home/7.常用模块/6.shutil模块.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.6.</b>
                        
                        shutil模块
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.7" data-path="home/7.常用模块/7.时间相关模块.html">
            
                
                    <a href="../../home/7.常用模块/7.时间相关模块.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.7.</b>
                        
                        时间相关模块
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="8" >
            
            <span><b>8.</b> 面向对象</span>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="8.1" data-path="home/8.面向对象/1.类和对象-上.html">
            
                
                    <a href="../../home/8.面向对象/1.类和对象-上.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.1.</b>
                        
                        类和对象-上
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="8.2" data-path="home/8.面向对象/2.类和对象-下.html">
            
                
                    <a href="../../home/8.面向对象/2.类和对象-下.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.2.</b>
                        
                        类和对象-下
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="8.3" data-path="home/8.面向对象/3.魔术方法.html">
            
                
                    <a href="../../home/8.面向对象/3.魔术方法.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.3.</b>
                        
                        魔术方法
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="8.4" data-path="home/8.面向对象/4.装饰器.html">
            
                
                    <a href="../../home/8.面向对象/4.装饰器.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.4.</b>
                        
                        装饰器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="8.5" data-path="home/8.面向对象/5.抽象类.html">
            
                
                    <a href="../../home/8.面向对象/5.抽象类.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.5.</b>
                        
                        抽象类
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="8.6" data-path="home/8.面向对象/6.错误和异常处理.html">
            
                
                    <a href="../../home/8.面向对象/6.错误和异常处理.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.6.</b>
                        
                        错误和异常处理
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="8.7" data-path="home/8.面向对象/7.模块和包.html">
            
                
                    <a href="../../home/8.面向对象/7.模块和包.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.7.</b>
                        
                        模块和包
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="9" >
            
            <span><b>9.</b> tkinter模块</span>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="9.1" data-path="home/9.tkinter模块/tkinter模块.html">
            
                
                    <a href="../../home/9.tkinter模块/tkinter模块.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>9.1.</b>
                        
                        tkinter模块
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="10" data-path="home/10.网络编程/1.网络编程.html">
            
                
                    <a href="../../home/10.网络编程/1.网络编程.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>10.</b>
                        
                        网络编程
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="10.1" data-path="home/10.网络编程/2.TCP编程.html">
            
                
                    <a href="../../home/10.网络编程/2.TCP编程.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>10.1.</b>
                        
                        TCP编程
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="10.2" data-path="home/10.网络编程/3.UDP编程.html">
            
                
                    <a href="../../home/10.网络编程/3.UDP编程.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>10.2.</b>
                        
                        UDP编程
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="11" data-path="home/11.多任务/多任务原理.html">
            
                
                    <a href="../../home/11.多任务/多任务原理.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>11.</b>
                        
                        多任务
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="11.1" data-path="home/11.多任务/1.多进程实现多任务.html">
            
                
                    <a href="../../home/11.多任务/1.多进程实现多任务.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>11.1.</b>
                        
                        多进程实现多任务
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="11.2" data-path="home/11.多任务/2.多线程实现多任务.html">
            
                
                    <a href="../../home/11.多任务/2.多线程实现多任务.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>11.2.</b>
                        
                        多线程实现多任务
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="11.3" data-path="home/11.多任务/3.协程实现多任务.html">
            
                
                    <a href="../../home/11.多任务/3.协程实现多任务.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>11.3.</b>
                        
                        协程实现多任务
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="12" >
            
            <span><b>12.</b> Python实战项目</span>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="12.1" data-path="home/12.Python实战项目/1.简易计算器.html">
            
                
                    <a href="../../home/12.Python实战项目/1.简易计算器.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>12.1.</b>
                        
                        简易计算器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="12.2" data-path="home/12.Python实战项目/2.自动售货机.html">
            
                
                    <a href="../../home/12.Python实战项目/2.自动售货机.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>12.2.</b>
                        
                        自动售货机
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="12.3" data-path="home/12.Python实战项目/3.银行项目.html">
            
                
                    <a href="../../home/12.Python实战项目/3.银行项目.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>12.3.</b>
                        
                        银行项目
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="12.4" data-path="home/12.Python实战项目/4.简单的登录注册.html">
            
                
                    <a href="../../home/12.Python实战项目/4.简单的登录注册.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>12.4.</b>
                        
                        简单的登录注册
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="12.5" data-path="home/12.Python实战项目/5.双色球.html">
            
                
                    <a href="../../home/12.Python实战项目/5.双色球.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>12.5.</b>
                        
                        双色球
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="12.6" data-path="home/12.Python实战项目/6.python垃圾回收机制.html">
            
                
                    <a href="../../home/12.Python实战项目/6.python垃圾回收机制.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>12.6.</b>
                        
                        python垃圾回收机制
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="12.7" data-path="home/12.Python实战项目/7.turtle画国旗.html">
            
                
                    <a href="../../home/12.Python实战项目/7.turtle画国旗.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>12.7.</b>
                        
                        turtle画国旗
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="12.8" data-path="home/12.Python实战项目/8.turtle画小猪佩奇.html">
            
                
                    <a href="../../home/12.Python实战项目/8.turtle画小猪佩奇.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>12.8.</b>
                        
                        turtle画小猪佩奇
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="12.9" data-path="home/12.Python实战项目/9.turtle画个表.html">
            
                
                    <a href="../../home/12.Python实战项目/9.turtle画个表.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>12.9.</b>
                        
                        turtle画个表
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../../" >MXY 1.0版Python整理</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="&#x6570;&#x636E;&#x7C7B;&#x578B;&#x8F6C;&#x6362;">&#x6570;&#x636E;&#x7C7B;&#x578B;&#x8F6C;&#x6362;</h1>
<hr>
<p>&#x5C06;&#x6570;&#x636E;&#x7531;&#x5F53;&#x524D;&#x7C7B;&#x578B;&#x53D8;&#x5316;&#x4E3A;&#x5176;&#x4ED6;&#x7C7B;&#x578B;&#x7684;&#x64CD;&#x4F5C;&#x5C31;&#x662F;&#x6570;&#x636E;&#x7C7B;&#x578B;&#x8F6C;&#x6362;&#x3002;&#x6570;&#x636E;&#x7C7B;&#x578B;&#x8F6C;&#x6362;&#x5206;&#x4E3A;&#x4E24;&#x7C7B;,&#x5206;&#x522B;&#x662F;<strong>&#x81EA;&#x52A8;&#x6570;&#x636E;&#x7C7B;&#x578B;&#x8F6C;&#x6362;</strong> &#x548C; <strong>&#x5F3A;&#x5236;&#x6570;&#x636E;&#x7C7B;&#x578B;&#x8F6C;&#x6362;</strong>&#x3002;</p>
<h2 id="&#x81EA;&#x52A8;&#x8F6C;&#x6362;&#x9690;&#x5F0F;&#x8F6C;&#x6362;">&#x81EA;&#x52A8;&#x8F6C;&#x6362;(&#x9690;&#x5F0F;&#x8F6C;&#x6362;)</h2>
<hr>
<ul>
<li>&#x81EA;&#x52A8;&#x8F6C;&#x6362;&#x65F6;&#x7A0B;&#x5E8F;&#x6839;&#x636E;&#x8FD0;&#x7B97;&#x8981;&#x6C42;&#x8FDB;&#x884C;&#x7684;&#x8F6C;&#x6362;,&#x4E0D;&#x8BB8;&#x8981;&#x4EBA;&#x5DE5;&#x5E72;&#x9884;&#x3002;</li>
<li>&#x81EA;&#x52A8;&#x6570;&#x636E;&#x7C7B;&#x578B;&#x8F6C;&#x6362;&#x4F1A;&#x4ECE;&#x7CBE;&#x786E;&#x5EA6;&#x8F83;&#x5C0F;&#x7684;&#x6570;&#x636E;&#x7C7B;&#x578B;&#x5411;&#x7CBE;&#x786E;&#x5EA6;&#x8F83;&#x9AD8;&#x7684;&#x6570;&#x636E;&#x7C7B;&#x578B;&#x8FDB;&#x884C;&#x8F6C;&#x6362;</li>
<li><p>&#x81EA;&#x52A8;&#x6570;&#x636E;&#x7C7B;&#x578B;&#x8F6C;&#x6362;&#x591A;&#x53D1;&#x751F;&#x5728;&#x8FD0;&#x7B97;&#x6216;&#x8005;&#x5224;&#x65AD;&#x7684;&#x65F6;&#x5019;</p>
<pre><code class="lang-python">  &#x5982;&#xFF1A;
      num1 = <span class="hljs-number">25</span>
      num2 = <span class="hljs-number">25.0</span>
      print(num1 + num2)
  &#x53C8;&#x5982;&#xFF1A;
      <span class="hljs-keyword">if</span> <span class="hljs-number">1</span>:
          print(<span class="hljs-string">&apos;1&#x4F1A;&#x81EA;&#x52A8;&#x8F6C;&#x5316;&#x6210;True&apos;</span>)
</code></pre>
</li>
</ul>
<h2 id="&#x5F3A;&#x5236;&#x8F6C;&#x6362;&#x663E;&#x5F0F;&#x8F6C;&#x6362;">&#x5F3A;&#x5236;&#x8F6C;&#x6362;(&#x663E;&#x5F0F;&#x8F6C;&#x6362;)</h2>
<hr>
<p>&#x6839;&#x636E;&#x7A0B;&#x5E8F;&#x9700;&#x8981;,&#x7531;&#x7F16;&#x5199;&#x7A0B;&#x5E8F;&#x4EBA;&#x5458;&#x4EBA;&#x4E3A;&#x6539;&#x53D8;&#x6570;&#x636E;&#x7C7B;&#x578B;&#x7684;&#x65B9;&#x5F0F;,&#x53EB;&#x505A;&#x5F3A;&#x5236;&#x6570;&#x636E;&#x7C7B;&#x578B;&#x8F6C;&#x6362;&#x3002;</p>
<h3 id="int-&#x5C06;&#x5176;&#x4ED6;&#x7C7B;&#x578B;&#x8F6C;&#x6362;&#x4E3A;&#x6574;&#x5F62;">int() &#x5C06;&#x5176;&#x4ED6;&#x7C7B;&#x578B;&#x8F6C;&#x6362;&#x4E3A;&#x6574;&#x5F62;</h3>
<blockquote>
<p>&#x6574;&#x578B;&#xFF1A;&#x65E0;&#x9700;&#x8F6C;&#x6362;
&#x6D6E;&#x70B9;&#x6570;&#xFF1A;&#x53BB;&#x6389;&#x5C0F;&#x6570;&#x90E8;&#x5206;,&#x53EA;&#x4FDD;&#x7559;&#x6574;&#x6570;&#x90E8;&#x5206;
&#x5E03;&#x5C14;2&#xFF1A;True &#x8F6C;&#x6362;&#x6210; 1,False &#x8F6C;&#x6362;&#x6210; 0
&#x590D;&#x6570;&#xFF1A;&#x590D;&#x6570;&#x65E0;&#x6CD5;&#x8F6C;&#x6362;&#x6210;&#x6574;&#x578B;
&#x5B57;&#x7B26;&#x4E32;&#xFF1A;&#x53EA;&#x6709;&#x7EAF;&#x6574;&#x6570;&#x5B57;&#x7B26;&#x4E32;&#x624D;&#x80FD;&#x8F6C;&#x6362;&#x6210;int&#x3002;
&#x5217;&#x8868;,&#x5143;&#x7EC4;,&#x96C6;&#x5408;,&#x5B57;&#x5178;&#x90FD;&#x4E0D;&#x80FD;&#x8F6C;&#x6362;&#x6210;&#x6574;&#x578B;</p>
</blockquote>
<h3 id="float-&#x5C06;&#x5176;&#x4ED6;&#x7C7B;&#x578B;&#x8F6C;&#x6362;&#x4E3A;&#x6D6E;&#x70B9;&#x578B;">float() &#x5C06;&#x5176;&#x4ED6;&#x7C7B;&#x578B;&#x8F6C;&#x6362;&#x4E3A;&#x6D6E;&#x70B9;&#x578B;</h3>
<blockquote>
<p>&#x6574;&#x578B;&#xFF1A;&#x5728;&#x6574;&#x6570;&#x540E;&#x9762;&#x52A0;&#x4E0A;.0
&#x6D6E;&#x70B9;&#x6570;&#xFF1A;&#x65E0;&#x9700;&#x8F6C;&#x6362;
&#x5E03;&#x5C14;2&#xFF1A;True &#x8F6C;&#x6362;&#x6210; 1.0     False &#x8F6C;&#x6362;&#x6210; 0.0
&#x590D;&#x6570;&#xFF1A;&#x590D;&#x6570;&#x65E0;&#x6CD5;&#x8F6C;&#x6362;&#x6210;&#x6D6E;&#x70B9;&#x6570;
&#x5B57;&#x7B26;&#x4E32;&#xFF1A;&#x53EA;&#x6709;&#x7EAF;&#x6574;&#x6570;&#x5B57;&#x7B26;&#x4E32;&#x548C;&#x7EAF;&#x6D6E;&#x70B9;&#x6570;&#x5B57;&#x7B26;&#x4E32;&#x624D;&#x80FD;&#x8F6C;&#x6362;&#x6210;&#x6D6E;&#x70B9;&#x6570;
&#x5217;&#x8868;,&#x5143;&#x7EC4;,&#x96C6;&#x5408;,&#x5B57;&#x5178;&#x90FD;&#x4E0D;&#x80FD;&#x8F6C;&#x6362;&#x6210;&#x6D6E;&#x70B9;&#x6570;</p>
</blockquote>
<h3 id="complex-&#x5C06;&#x5176;&#x4ED6;&#x7C7B;&#x578B;&#x8F6C;&#x6362;&#x4E3A;&#x590D;&#x6570;&#x7C7B;&#x578B;">complex() &#x5C06;&#x5176;&#x4ED6;&#x7C7B;&#x578B;&#x8F6C;&#x6362;&#x4E3A;&#x590D;&#x6570;&#x7C7B;&#x578B;</h3>
<blockquote>
<p>&#x6574;&#x578B;&#xFF1A;&#x6574;&#x578B;+0j
&#x6D6E;&#x70B9;&#x6570;&#xFF1A;&#x6D6E;&#x70B9;&#x6570;+0j
&#x5E03;&#x5C14;2&#xFF1A;True&#xFF1A;1+0j&#xFF1B; False&#xFF1A;0j &#x6216;&#x8005; 0+0j
&#x590D;&#x6570;&#xFF1A;&#x65E0;&#x9700;&#x8F6C;&#x6362;
&#x5B57;&#x7B26;&#x4E32;&#xFF1A;&#x5B57;&#x7B26;&#x4E32;&#x4E2D;&#x53EA;&#x6709;&#x7EAF;&#x6574;&#x6570;,&#x7EAF;&#x6D6E;&#x70B9;&#x6570;&#x6216;&#x8005;&#x7EAF;&#x590D;&#x6570;&#x624D;&#x80FD;&#x8F6C;&#x6362;&#x6210;&#x590D;&#x6570;
&#x5217;&#x8868;&#x3001;&#x5143;&#x7EC4;&#x3001;&#x96C6;&#x5408;&#x3001;&#x5B57;&#x5178;&#x90FD;&#x4E0D;&#x80FD;&#x8F6C;&#x6362;&#x6210;&#x590D;&#x6570;</p>
</blockquote>
<h3 id="bool-&#x5C06;&#x5176;&#x4ED6;&#x7C7B;&#x578B;&#x8F6C;&#x6362;&#x4E3A;&#x5E03;&#x5C14;&#x7C7B;&#x578B;">bool() &#x5C06;&#x5176;&#x4ED6;&#x7C7B;&#x578B;&#x8F6C;&#x6362;&#x4E3A;&#x5E03;&#x5C14;&#x7C7B;&#x578B;</h3>
<p>&#x5176;&#x4ED6;&#x7C7B;&#x578B;&#x4E2D;,&#x76F8;&#x5F53;&#x4E8E;bool&#x4E2D;&#x7684;<strong>False</strong>&#x7684;&#x60C5;&#x51B5;</p>
<blockquote>
<p>&#x6574;&#x578B;&#xFF1A;          0
&#x6D6E;&#x70B9;&#x578B;&#xFF1A;      0.0
bool&#xFF1A;       False
&#x590D;&#x6570;&#xFF1A;         0j  &#x6216;&#x8005;  0+0j
&#x5B57;&#x7B26;&#x4E32;&#xFF1A;    &apos;&apos;(&#x7A7A;&#x5B57;&#x7B26;&#x4E32;)
&#x5217;&#x8868;&#xFF1A;         [] &#x6216;&#x8005; list() 
&#x5143;&#x7EC4;&#xFF1A;         () &#x6216;&#x8005; tuple()
&#x96C6;&#x5408;&#xFF1A;         set()
&#x5B57;&#x5178;&#xFF1A;          {} &#x6216;&#x8005; dict()
None</p>
</blockquote>
<p>&#x5176;&#x4ED6;&#x90FD;&#x4E3A;<strong>True</strong></p>
<h3 id="str-&#x5C06;&#x5176;&#x4ED6;&#x7C7B;&#x578B;&#x8F6C;&#x6362;&#x4E3A;&#x5B57;&#x7B26;&#x4E32;&#x7C7B;&#x578B;">str() &#x5C06;&#x5176;&#x4ED6;&#x7C7B;&#x578B;&#x8F6C;&#x6362;&#x4E3A;&#x5B57;&#x7B26;&#x4E32;&#x7C7B;&#x578B;</h3>
<p>&#x6240;&#x6709;&#x7C7B;&#x578B;&#x90FD;&#x53EF;&#x4EE5;&#x8F6C;&#x6362;&#x6210;&#x5B57;&#x7B26;&#x4E32;,&#x7CFB;&#x7EDF;&#x4F1A;&#x81EA;&#x52A8;&#x7ED9;&#x5176;&#x4ED6;&#x7C7B;&#x578B;&#x52A0;&#x4E0A;<code>&apos; &apos;</code>&#x8BA9;&#x5B83;&#x53D8;&#x6210;&#x5B57;&#x7B26;&#x4E32;
&#x5982;&#x679C;&#x8981;&#x6253;&#x5370;&#x51FA;&#x5E26;&#x5F15;&#x53F7;&#x7684;&#x5B57;&#x7B26;&#x4E32;,&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x547D;&#x4EE4;repr()&#x3002;&#x5982;&#xFF1A;</p>
<pre><code class="lang-python">list1 = [<span class="hljs-number">1</span>,<span class="hljs-number">2</span>,<span class="hljs-number">3</span>]
list1 = str(list1)
print(repr(list1))
</code></pre>
<h3 id="list-&#x5C06;&#x5176;&#x4ED6;&#x7C7B;&#x578B;&#x8F6C;&#x6362;&#x4E3A;&#x5217;&#x8868;&#x7C7B;&#x578B;">list() &#x5C06;&#x5176;&#x4ED6;&#x7C7B;&#x578B;&#x8F6C;&#x6362;&#x4E3A;&#x5217;&#x8868;&#x7C7B;&#x578B;</h3>
<blockquote>
<p>&#x6574;&#x578B;&#x3001;&#x6D6E;&#x70B9;&#x578B;&#x3001;&#x590D;&#x6570;&#x3001;&#x5E03;&#x5C14;2&#x90FD;&#x4E0D;&#x80FD;&#x8F6C;&#x6362;&#x6210;&#x5217;&#x8868;
&#x5B57;&#x7B26;&#x4E32;&#xFF1A;&#x5B57;&#x7B26;&#x4E32;&#x8F6C;&#x6362;&#x6210;&#x5217;&#x8868;,&#x628A;&#x5B57;&#x7B26;&#x4E32;&#x4E2D;&#x7684;&#x6BCF;&#x4E2A;2&#x8F6C;&#x6362;&#x6210;&#x5217;&#x8868;&#x4E2D;&#x7684;&#x6BCF;&#x4E00;&#x4E2A;2,&#x987A;&#x5E8F;&#x4FDD;&#x6301;&#x4E0D;&#x53D8;
&#x5217;&#x8868;&#xFF1A; &#x65E0;&#x9700;&#x8F6C;&#x6362;
&#x5143;&#x7EC4;&#xFF1A; &#x628A;&#x5143;&#x7EC4;&#x4E2D;&#x7684;&#x6BCF;&#x4E2A;2&#x8F6C;&#x6362;&#x6210;&#x5217;&#x8868;&#x4E2D;&#x7684;2,&#x987A;&#x5E8F;&#x4FDD;&#x6301;&#x53D8;
&#x96C6;&#x5408;&#xFF1A; &#x628A;&#x96C6;&#x5408;&#x8F6C;&#x6362;&#x6210;&#x5217;&#x8868;&#x4E2D;&#x7684;&#x6BCF;&#x4E00;&#x4E2A;2,&#x987A;&#x5E8F;&#x968F;&#x673A;
&#x5B57;&#x5178;&#xFF1A; &#x628A;&#x5B57;&#x5178;&#x4E2D;&#x7684;1&#x8F6C;&#x6362;&#x6210;&#x5217;&#x8868;&#x4E2D;&#x7684;2,&#x987A;&#x5E8F;&#x968F;&#x673A;</p>
</blockquote>
<h3 id="tuple-&#x5C06;&#x5176;&#x4ED6;&#x7C7B;&#x578B;&#x8F6C;&#x6362;&#x4E3A;&#x5143;&#x7EC4;&#x7C7B;&#x578B;">tuple() &#x5C06;&#x5176;&#x4ED6;&#x7C7B;&#x578B;&#x8F6C;&#x6362;&#x4E3A;&#x5143;&#x7EC4;&#x7C7B;&#x578B;</h3>
<blockquote>
<p>&#x6574;&#x578B;&#x3001;&#x6D6E;&#x70B9;&#x6570;&#x3001;&#x590D;&#x6570;&#x3001;&#x5E03;&#x5C14;2&#x90FD;&#x4E0D;&#x80FD;&#x8F6C;&#x6362;&#x6210;&#x5143;&#x7EC4;
&#x5B57;&#x7B26;&#x4E32;&#xFF1A;&#x5B57;&#x7B26;&#x4E32;&#x4E2D;&#x7684;&#x6BCF;&#x4E2A;&#x5B57;&#x7B26;&#x8F6C;&#x6362;&#x6210;&#x5143;&#x7EC4;&#x4E2D;&#x7684;&#x4E00;&#x4E2A;2,&#x987A;&#x5E8F;&#x4E0D;&#x53D8;
&#x5217;&#x8868;&#xFF1A; &#x5217;&#x8868;&#x4E2D;&#x7684;&#x6BCF;&#x4E00;&#x4E2A;2&#x8F6C;&#x6362;&#x6210;&#x5143;&#x7EC4;&#x4E2D;&#x7684;2,&#x987A;&#x5E8F;&#x4E0D;&#x53D8;
&#x5143;&#x7EC4;&#xFF1A; &#x65E0;&#x9700;&#x8F6C;&#x6362;
&#x96C6;&#x5408;&#xFF1A; &#x96C6;&#x5408;&#x4E2D;&#x7684;&#x6BCF;&#x4E2A;2&#x8F6C;&#x6362;&#x6210;&#x5143;&#x7EC4;&#x4E2D;&#x7684;&#x6BCF;&#x4E2A;2,&#x987A;&#x5E8F;&#x968F;&#x673A;
&#x5B57;&#x5178;&#xFF1A; &#x5B57;&#x5178;&#x4E2D;&#x7684;&#x6BCF;&#x4E2A;1&#x8F6C;&#x6362;&#x6210;&#x5143;&#x7EC4;&#x4E2D;&#x7684;&#x4E00;&#x4E2A;2,&#x987A;&#x5E8F;&#x968F;&#x673A;</p>
</blockquote>
<h3 id="set-&#x5C06;&#x5176;&#x4ED6;&#x7C7B;&#x578B;&#x8F6C;&#x6362;&#x4E3A;&#x96C6;&#x5408;&#x7C7B;&#x578B;">set() &#x5C06;&#x5176;&#x4ED6;&#x7C7B;&#x578B;&#x8F6C;&#x6362;&#x4E3A;&#x96C6;&#x5408;&#x7C7B;&#x578B;</h3>
<blockquote>
<p>&#x6574;&#x578B;&#x3001;&#x6D6E;&#x70B9;&#x578B;&#x3001;&#x590D;&#x6570;&#x3001;&#x5E03;&#x5C14;2&#x90FD;&#x4E0D;&#x80FD;&#x8F6C;&#x6362;&#x6210;&#x96C6;&#x5408;
&#x5B57;&#x7B26;&#x4E32;&#xFF1A; &#x5B57;&#x7B26;&#x4E32;&#x4E2D;&#x7684;&#x6BCF;&#x4E2A;&#x5B57;&#x7B26;&#x8F6C;&#x6362;&#x6210;&#x96C6;&#x5408;&#x4E2D;&#x7684;&#x4E00;&#x4E2A;2,&#x987A;&#x5E8F;&#x968F;&#x673A;
&#x5217;&#x8868;&#xFF1A; &#x5217;&#x8868;&#x4E2D;&#x7684;&#x6BCF;&#x4E2A;2&#x8F6C;&#x6362;&#x6210;&#x96C6;&#x5408;&#x4E2D;&#x7684;&#x4E00;&#x4E2A;2,&#x987A;&#x5E8F;&#x968F;&#x673A;
&#x5143;&#x7EC4;&#xFF1A; &#x5143;&#x7EC4;&#x4E2D;&#x7684;&#x6BCF;&#x4E2A;2&#x8F6C;&#x6362;&#x6210;&#x96C6;&#x5408;&#x4E2D;&#x7684;&#x4E00;&#x4E2A;2,&#x987A;&#x5E8F;&#x968F;&#x673A;
&#x96C6;&#x5408;&#xFF1A; &#x65E0;&#x9700;&#x8F6C;&#x6362;
&#x5B57;&#x5178;&#xFF1A; &#x5B57;&#x5178;&#x4E2D;&#x7684;&#x6BCF;&#x4E2A;1&#x8F6C;&#x6362;&#x6210;&#x96C6;&#x5408;&#x4E2D;&#x7684;&#x4E00;&#x4E2A;2,&#x987A;&#x5E8F;&#x968F;&#x673A;</p>
</blockquote>
<h3 id="dict-&#x5C06;&#x5176;&#x4ED6;&#x7C7B;&#x578B;&#x8F6C;&#x6362;&#x4E3A;&#x5B57;&#x5178;&#x7C7B;&#x578B;">dict() &#x5C06;&#x5176;&#x4ED6;&#x7C7B;&#x578B;&#x8F6C;&#x6362;&#x4E3A;&#x5B57;&#x5178;&#x7C7B;&#x578B;</h3>
<pre><code class="lang-python">* &#x6574;&#x578B;&#x3001;&#x6D6E;&#x70B9;&#x578B;&#x3001;&#x590D;&#x6570;&#x3001;&#x5E03;&#x5C14;<span class="hljs-number">2</span>&#x90FD;&#x4E0D;&#x80FD;&#x8F6C;&#x6362;&#x6210;&#x5B57;&#x5178;
* &#x5B57;&#x7B26;&#x4E32;&#xFF1A; &#x4E0D;&#x80FD;&#x8F6C;&#x6362;&#x6210;&#x5B57;&#x5178;
* &#x5217;&#x8868;&#xFF1A; &#x53EA;&#x6709;&#x7279;&#x5B9A;&#x7684;&#x5217;&#x8868;&#x683C;&#x5F0F;&#x53EF;&#x4EE5;&#x8F6C;&#x6362;&#x6210;&#x5B57;&#x5178;
    <span class="hljs-number">1.</span> &#x4E8C;&#x7EA7;&#x5217;&#x8868;&#xFF08;&#x4E14;&#x7B2C;&#x4E8C;&#x7EA7;&#x5BB9;&#x5668;&#x7684;&#x957F;&#x5EA6;&#x4E00;&#x6837;&#xFF09;
        <span class="hljs-comment"># &#x5217;&#x8868;&#x5D4C;&#x5957;&#x5217;&#x8868;&#xFF0C;&#x7B2C;&#x4E00;&#x4E2A;&#x503C;&#x4E3A;&#x952E;&#xFF0C;&#x7B2C;&#x4E8C;&#x4E2A;&#x503C;&#x4E3A;&#x503C;</span>
        list1 = [[<span class="hljs-number">1</span>,<span class="hljs-number">2</span>],[<span class="hljs-number">3</span>,<span class="hljs-number">4</span>],[<span class="hljs-number">5</span>,<span class="hljs-number">6</span>],[<span class="hljs-number">7</span>,<span class="hljs-number">8</span>]]      &#x2460;
        <span class="hljs-comment"># &#x5217;&#x8868;&#x5D4C;&#x5957;&#x5143;&#x7EC4;&#xFF0C;&#x7B2C;&#x4E00;&#x4E2A;&#x503C;&#x4E3A;&#x952E;&#xFF0C;&#x7B2C;&#x4E8C;&#x4E2A;&#x503C;&#x4E3A;&#x503C;</span>
        list1 = [(<span class="hljs-number">1</span>,<span class="hljs-number">2</span>),(<span class="hljs-number">3</span>,<span class="hljs-number">4</span>),(<span class="hljs-number">5</span>,<span class="hljs-number">6</span>),(<span class="hljs-number">7</span>,<span class="hljs-number">8</span>)]       &#x2461;
        <span class="hljs-comment"># &#x5217;&#x8868;&#x5D4C;&#x5957;&#x96C6;&#x5408;,&#x6B64;&#x79CD;&#x60C5;&#x51B5;&#x8F6C;&#x6362;&#x4E4B;&#x540E;&#x5E76;&#x65E0;&#x952E;&#x3001;&#x503C;&#x6620;&#x5C04;&#x5173;&#x7CFB;</span>
        list1 = [{<span class="hljs-number">1</span>,<span class="hljs-number">2</span>},{<span class="hljs-number">3</span>,<span class="hljs-number">4</span>},{<span class="hljs-number">5</span>,<span class="hljs-number">6</span>},{<span class="hljs-number">7</span>,<span class="hljs-number">8</span>}]       &#x2462;

    <span class="hljs-number">2.</span> &#x4E00;&#x7EA7;&#x5217;&#x8868;&#xFF1A;&#x53EA;&#x542B;&#x6709;&#x4E24;&#x4E2A;&#x5B57;&#x7B26;&#x7684;&#x4E00;&#x7EA7;&#x5217;&#x8868;
        list1 = [<span class="hljs-string">&apos;12&apos;</span>,<span class="hljs-string">&apos;34&apos;</span>,<span class="hljs-string">&apos;56&apos;</span>,<span class="hljs-string">&apos;78&apos;</span>]       &#x2463;


* &#x5143;&#x7EC4;&#xFF1A; &#x53EA;&#x6709;&#x7279;&#x5B9A;&#x7684;&#x5143;&#x7EC4;&#x683C;&#x5F0F;&#x624D;&#x53EF;&#x4EE5;&#x8F6C;&#x6362;&#x6210;&#x5B57;&#x5178;
    <span class="hljs-number">1.</span> &#x4E8C;&#x7EA7;&#x5143;&#x7EC4;&#xFF08;&#x4E14;&#x7B2C;&#x4E8C;&#x7EA7;&#x5BB9;&#x5668;&#x7684;&#x957F;&#x5EA6;&#x4E00;&#x6837;&#xFF09;
        <span class="hljs-comment"># &#x5143;&#x7EC4;&#x5D4C;&#x5957;&#x5217;&#x8868;&#xFF0C;&#x7B2C;&#x4E00;&#x4E2A;&#x503C;&#x4E3A;&#x952E;&#xFF0C;&#x7B2C;&#x4E8C;&#x4E2A;&#x503C;&#x4E3A;&#x503C;</span>
        tuple1 = ([<span class="hljs-number">1</span>,<span class="hljs-number">2</span>],[<span class="hljs-number">3</span>,<span class="hljs-number">4</span>],[<span class="hljs-number">5</span>,<span class="hljs-number">6</span>],[<span class="hljs-number">7</span>,<span class="hljs-number">8</span>])      &#x2464;
        <span class="hljs-comment"># &#x5143;&#x7EC4;&#x5D4C;&#x5957;&#x5143;&#x7EC4;&#xFF0C;&#x7B2C;&#x4E00;&#x4E2A;&#x503C;&#x4E3A;&#x952E;&#xFF0C;&#x7B2C;&#x4E8C;&#x4E2A;&#x503C;&#x4E3A;&#x503C;</span>
        tuple1 = ((<span class="hljs-number">1</span>,<span class="hljs-number">2</span>),(<span class="hljs-number">3</span>,<span class="hljs-number">4</span>),(<span class="hljs-number">5</span>,<span class="hljs-number">6</span>),(<span class="hljs-number">7</span>,<span class="hljs-number">8</span>))     &#x2465;
        <span class="hljs-comment"># &#x5143;&#x7EC4;&#x5D4C;&#x5957;&#x5143;&#x7EC4;&#xFF0C;&#x6B64;&#x79CD;&#x60C5;&#x51B5;&#x8F6C;&#x6362;&#x4E4B;&#x540E;&#x5E76;&#x65E0;&#x952E;&#x3001;&#x503C;&#x6620;&#x5C04;&#x5173;&#x7CFB;</span>
        tuple1 = ({<span class="hljs-number">1</span>,<span class="hljs-number">2</span>},{<span class="hljs-number">3</span>,<span class="hljs-number">4</span>},{<span class="hljs-number">5</span>,<span class="hljs-number">6</span>},{<span class="hljs-number">7</span>,<span class="hljs-number">8</span>})     &#x2466;

    <span class="hljs-number">2.</span> &#x4E00;&#x7EA7;&#x5143;&#x7EC4;&#xFF1A;&#x53EA;&#x542B;&#x6709;&#x4E24;&#x4E2A;&#x5B57;&#x7B26;&#x7684;&#x4E00;&#x7EA7;&#x5143;&#x7EC4;
        tuple1 = (<span class="hljs-string">&apos;12&apos;</span>,<span class="hljs-string">&apos;34&apos;</span>,<span class="hljs-string">&apos;56&apos;</span>,<span class="hljs-string">&apos;78&apos;</span>)      &#x2467;

* &#x96C6;&#x5408;&#xFF1A; &#x53EA;&#x6709;&#x7279;&#x5B9A;&#x7684;&#x96C6;&#x5408;&#x683C;&#x5F0F;&#x624D;&#x53EF;&#x4EE5;&#x8F6C;&#x6362;&#x6210;&#x5B57;&#x5178;
    <span class="hljs-number">1.</span> &#x4E8C;&#x7EA7;&#x96C6;&#x5408;&#xFF08;&#x4E14;&#x7B2C;&#x4E8C;&#x7EA7;&#x5BB9;&#x5668;&#x7684;&#x957F;&#x5EA6;&#x4E00;&#x6837;&#xFF09;
        set1 = {(<span class="hljs-number">1</span>,<span class="hljs-number">2</span>),(<span class="hljs-number">3</span>,<span class="hljs-number">4</span>),(<span class="hljs-number">5</span>,<span class="hljs-number">6</span>),(<span class="hljs-number">7</span>,<span class="hljs-number">8</span>)}   &#x2468;
</code></pre>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../../home/3.变量和数据类型/2.数据类型.html" class="navigation navigation-prev " aria-label="Previous page: 数据类型"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../../home/3.变量和数据类型/4.运算和运算符.html" class="navigation navigation-next " aria-label="Next page: 数据类型转换"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../../gitbook/app.js"></script>

    
    <script src="../../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
